package com.yang.frost.blueberry.quartz.util;

import com.yang.frost.blueberry.quartz.base.BaseJob;

/**
 * @author 10296
 * @date 2021/1/20
 * @Description: 定时任务反射工具类
 */
public class JobUtil {

    /**
     * 根据全类名获取Job实例
     *
     * @param classname
     * @return
     * @throws Exception
     */
    public static BaseJob getClass(String classname) throws Exception {

        Class<?> aClass = Class.forName(classname);
        return (BaseJob) aClass.newInstance();
    }


}
